aboutsummaryrefslogtreecommitdiffstats
path: root/src/routes/(app)/[username]/generate/+server.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/routes/(app)/[username]/generate/+server.js')
-rw-r--r--src/routes/(app)/[username]/generate/+server.js5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/routes/(app)/[username]/generate/+server.js b/src/routes/(app)/[username]/generate/+server.js
index 608f0575..4cc248bd 100644
--- a/src/routes/(app)/[username]/generate/+server.js
+++ b/src/routes/(app)/[username]/generate/+server.js
@@ -3,10 +3,9 @@ import { error, json } from '@sveltejs/kit';
export async function POST({ cookies, request }) {
try {
- let body = await request.json();
- let user = await post(`/user`, body, auth(cookies));
- return json(user);
+ return json(await post(`/user`, await request.json(), auth(cookies)));
} catch (e) {
+ console.log(e);
throw error(500, e.message);
}
}